// 引入封装好的http.js
import { getData,postData,deleteData,putData } from '../util/www';
import { http } from '../util/www';
let apiServe = {
    // 客户列表接口
    basCustomer:(data)=>http('/basCustomer/list','get',data),
    // 客户添加接口
    basCustomeradd:(data)=>http('/basCustomer/add','post',data),
    // 客户删除接口
    basCustomerdelete:(data)=>deleteData('/basCustomer/delete','delete',data),
    // 客户编辑接口
    basCustomeredit:(data)=>http('/basCustomer/edit','put',data),

    
    // 供应商列表接口
    basSupplier:(data)=>http('/basSupplier/list','get',data),
    // 客户添加接口     
    basSupplieradd:(data)=>http('/basSupplier/add','post',data),
    // 客户删除接口
    basSupplierdelete:(data)=>deleteData(`/basSupplier/delete`,'delete',data),
    // 客户编辑接口
    basSupplieredit:(data)=>http('/basSupplier/edit','put',data),

    // 仓库列表接口
    basWarehouse:(data)=>http('/basWarehouse/rootList','get',data),
    // 客户添加接口
    basWarehouseadd:(data)=>http('/basWarehouse/add','post',data),
    // 客户删除接口
    basWarehousedelete:(data)=>deleteData(`/basWarehouse/delete`,'delete',data),
    // 客户编辑接口
    basWarehouseedit:(data)=>http('/basWarehouse/edit','put',data),

    // 物料分类列表接口
    basMaterialCategory:(data)=>http('/basMaterialCategory/rootList','get',data),
    // 客户添加接口
    basMaterialCategoryadd:(data)=>http('/basMaterialCategory/add','post',data),
    // 客户删除接口
    basMaterialCategorydelete:(data)=>deleteData(`/basMaterialCategory/delete`,'delete',data),
    // 客户编辑接口
    basMaterialCategoryedit:(data)=>http('/basMaterialCategory/edit','put',data),

    // 物料列表接口
    basMaterial:(data)=>http('/basMaterial/list','get',data),
    // 客户添加接口
    basMaterialadd:(data)=>http('/basMaterial/add','post',data),
    // 客户删除接口
    basMaterialdelete:(data)=>deleteData(`/basMaterial/delete`,'delete',data),
    // 客户编辑接口
    basMaterialedit:(data)=>http('/basMaterial/edit','put',data),

    // 计量单位列表接口
    basUnit:(data)=>http('/basUnit/rootList','get',data),
    // 客户添加接口
    basUnitadd:(data)=>http('/basUnit/add','post',data),
    // 客户删除接口
    basUnitdelete:(data)=>deleteData(`/basUnit/delete`,'delete',data),
    // 客户编辑接口
    basUnitedit:(data)=>http('/basUnit/edit','put',data),

    // 币种列表接口
    basCurrency:(data)=>http('/basCurrency/list','get',data),
    // 客户添加接口
    basCurrencyadd:(data)=>http('/basCurrency/add','post',data),
    // 客户删除接口
    basCurrencydelete:(data)=>deleteData(`/basCurrency/delete`,'delete',data),
    // 客户编辑接口
    basCurrencyedit:(data)=>http('/basCurrency/edit','put',data),

    // 银行账户列表接口
    basBankAccount:(data)=>http('/basBankAccount/list','get',data),
    // 客户添加接口
    basBankAccountadd:(data)=>http('/basBankAccount/add','post',data),
    // 客户删除接口
    basBankAccountdelete:(data)=>deleteData(`/basBankAccount/delete`,'delete',data),
    // 客户编辑接口
    basBankAccountedit:(data)=>http('/basBankAccount/edit','put',data),
}
export { apiServe }